package com.zy.cat.entity.mall.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import com.zy.cat.entity.mall.CatGoodsCouponHistory;
public interface CatGoodsCouponHistoryRepository extends JpaSpecificationExecutor<CatGoodsCouponHistory>,  JpaRepository<CatGoodsCouponHistory, String>{
	
	@Query("from CatGoodsCouponHistory where pid=:pid order by ltime DESC")
	List<CatGoodsCouponHistory> findByPid(String pid);
	
	@Query("from CatGoodsCouponHistory where numIid=:numIid")
	List<CatGoodsCouponHistory> findByNumIid(String numIid);
	
}
